Skip to content

Add -Zsanitize=kernel-hwaddress#153049

Draft
Darksonn wants to merge 1 commit intorust-lang:mainfrom
Darksonn:kasan-sw-tags
Draft

Add -Zsanitize=kernel-hwaddress#153049
Darksonn wants to merge 1 commit intorust-lang:mainfrom
Darksonn:kasan-sw-tags

Conversation

@Darksonn
Copy link
Member

@Darksonn Darksonn commented Feb 24, 2026

The Linux kernel has a config option called CONFIG_KASAN_SW_TAGS that enables -fsanitize=kernel-hwaddress. This is not supported by Rust.

Note that #[sanitize(kernel_hwaddress = "off")] could be supported as an annotation on statics, but since it's also missing for #[sanitize(hwaddress = "off")], I did not add it.

cc @rcvalle @maurer @ojeda

@Darksonn Darksonn added the A-sanitizers Area: Sanitizers for correctness and code quality label Feb 24, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 24, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
/dev/sda15       98M  6.4M   92M   7% /boot/efi
tmpfs           1.6G   16K  1.6G   1% /run/user/1001
================================================================================

Sufficient disk space available (120899356KB >= 52428800KB). Skipping cleanup.
##[group]Run echo "[CI_PR_NUMBER=$num]"
echo "[CI_PR_NUMBER=$num]"
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
---
set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip compiler \
  --skip src
#!/bin/bash

set -ex

# Run a subset of tests. Used to run tests in parallel in multiple jobs.

# When this job partition is run as part of PR CI, skip tidy to allow revealing more failures. The
# dedicated `tidy` job failing won't block other PR CI jobs from completing, and so tidy failures
# shouldn't inhibit revealing other failures in PR CI jobs.
if [ "$PR_CI_JOB" == "1" ]; then
  echo "PR_CI_JOB set; skipping tidy"
  SKIP_TIDY="--skip tidy"
fi

../x.py --stage 2 test \
  ${SKIP_TIDY:+$SKIP_TIDY} \
  --skip tests \
  --skip coverage-map \
  --skip coverage-run \
  --skip library \
  --skip tidyselftest
---
Executing "/scripts/stage_2_test_set1.sh"
+ /scripts/stage_2_test_set1.sh
PR_CI_JOB set; skipping tidy
+ '[' 1 == 1 ']'
+ echo 'PR_CI_JOB set; skipping tidy'
+ SKIP_TIDY='--skip tidy'
+ ../x.py --stage 2 test --skip tidy --skip compiler --skip src
##[group]Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2026-01-21/rustfmt-nightly-aarch64-unknown-linux-gnu.tar.xz
---
test [ui] tests/ui/abi/abi-sysv64-register-usage.rs ... ignored, ignored when the architecture is aarch64
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_disabled ... ok
test [ui] tests/ui/abi/abi-typo-unstable.rs#feature_enabled ... ok
test [ui] tests/ui/abi/anon-extern-mod.rs ... ok
test [ui] tests/ui/abi/avr-sram.rs#disable_sram ... ok
test [ui] tests/ui/abi/avr-sram.rs#has_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#aarch64 ... ok
test [ui] tests/ui/abi/avr-sram.rs#no_sram ... ok
test [ui] tests/ui/abi/arm-unadjusted-intrinsic.rs#arm ... ok
test [ui] tests/ui/abi/bad-custom.rs ... ok
test [ui] tests/ui/abi/c-stack-as-value.rs ... ok
test [ui] tests/ui/abi/c-zst.rs#aarch64-darwin ... ok
test [ui] tests/ui/abi/c-zst.rs#powerpc-linux ... ok
---
test [ui] tests/ui/asm/aarch64/ttbr0_el2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-2.rs ... ok
test [ui] tests/ui/asm/aarch64/type-check-3.rs ... ok
test [ui] tests/ui/asm/aarch64/type-f16.rs ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#hf ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#r82 ... ok
test [ui] tests/ui/asm/aarch64v8r.rs#sf ... ok
test [ui] tests/ui/asm/aarch64/sym.rs ... ok
test [ui] tests/ui/asm/asm-with-nested-closure.rs ... ok
test [ui] tests/ui/asm/binary_asm_labels.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/arm-low-dreg.rs ... ok
test [ui] tests/ui/asm/cfg-parse-error.rs ... ok
---
test [ui] tests/ui/const-generics/ogca/basic.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-4.rs ... ok
test [ui] tests/ui/const-generics/ogca/basic-fail.rs ... ok
test [ui] tests/ui/const-generics/occurs-check/unused-substs-5.rs ... ok
test [ui] tests/ui/const-generics/ogca/generic-param-rhs.rs ... ok
test [ui] tests/ui/const-generics/ogca/coherence-ambiguous.rs ... ok
test [ui] tests/ui/const-generics/ogca/rhs-but-not-root.rs ... ok
test [ui] tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs ... ok
test [ui] tests/ui/const-generics/opaque_types.rs ... ok
test [ui] tests/ui/const-generics/overlapping_impls.rs ... ok
test [ui] tests/ui/const-generics/opaque_types2.rs ... ok
test [ui] tests/ui/const-generics/params-in-ct-in-ty-param-lazy-norm.rs#full ... ok
---
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat2 ... ok
test [ui] tests/ui/extern/issue-64655-extern-rust-must-allow-unwind.rs#fat3 ... ok
test [ui] tests/ui/extern/issue-80074.rs ... ok
test [ui] tests/ui/extern/issue-95829.rs ... ok
test [ui] tests/ui/extern/lgamma-linkage.rs ... ok
test [ui] tests/ui/extern/no-mangle-associated-fn.rs ... ok
test [ui] tests/ui/extern/not-in-block.rs ... ok
test [ui] tests/ui/extern/unsized-extern-derefmove.rs ... ok
test [ui] tests/ui/extern/windows-tcb-trash-13259.rs ... ok
test [ui] tests/ui/feature-gates/allow-features-empty.rs ... ok
---
test [ui] tests/ui/feature-gates/feature-gate-macro-derive.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-macro-metavar-expr-concat.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-marker_trait_attr.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-may-dangle.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-mgca-type-const-syntax.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min-generic-const-args.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-movrs_target_feature.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/feature-gates/feature-gate-more-maybe-bounds.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-min_const_fn.rs ... ok
test [ui] tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs ... ignored, only executed when the architecture is x86_64
---
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-import-visibility-module.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-core.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-pick-std.rs ... ok
---
test [ui] tests/ui/layout/post-mono-layout-cycle.rs ... ok
test [ui] tests/ui/layout/randomize.rs#normal ... ok
test [ui] tests/ui/layout/null-pointer-optimization.rs ... ok
test [ui] tests/ui/layout/randomize.rs#randomize-layout ... ok
test [ui] tests/ui/layout/rigid-alias-due-to-broken-impl.rs ... ok
test [ui] tests/ui/layout/size-of-val-raw-too-big.rs ... ignored, only executed when the pointer width is 32bit (Layout computation rejects this layout for different reasons on 64-bit.)
test [ui] tests/ui/layout/reprc-power-alignment.rs ... ok
test [ui] tests/ui/layout/struct.rs ... ok
test [ui] tests/ui/layout/rust-call-abi-not-a-tuple-ice-81974.rs ... ok
test [ui] tests/ui/layout/rigid-alias-no-params.rs ... ok
---
test [codegen] tests/codegen-llvm/sanitizer/cfi/normalize-integers.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/cfi/external_weak_symbols.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/cfi/emit-type-metadata-trait-objects.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs#aarch64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/hwasan-vs-khwasan.rs#hwasan ... ok
test [codegen] tests/codegen-llvm/sanitizer/hwasan-vs-khwasan.rs#khwasan ... ok
test [codegen] tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs#aarch64v8r ... ok
test [codegen] tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs#riscv64gc ... ok
test [codegen] tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs#riscv64imac ... ok
test [codegen] tests/codegen-llvm/sanitizer/kasan-emits-instrumentation.rs#x86_64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/kasan-recover.rs#KASAN ... ok
test [codegen] tests/codegen-llvm/sanitizer/kcfi/add-cfi-normalize-integers-flag.rs#aarch64 ... ok
---
test [codegen] tests/codegen-llvm/sanitizer/kcfi/naked-function.rs#aarch64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/kcfi/naked-function.rs#aarch64v8r ... ok
test [codegen] tests/codegen-llvm/sanitizer/khwasan-lifetime-markers.rs#aarch64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/kcfi/naked-function.rs#x86_64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/khwasan-recover.rs#KHWASAN ... ok
test [codegen] tests/codegen-llvm/sanitizer/memory-track-origins.rs#MSAN-0 ... ok
test [codegen] tests/codegen-llvm/sanitizer/khwasan-recover.rs#KHWASAN-RECOVER ... ok
test [codegen] tests/codegen-llvm/sanitizer/memory-track-origins.rs#MSAN-1 ... ok
test [codegen] tests/codegen-llvm/sanitizer/memory-track-origins.rs#MSAN-1-LTO ... ok
test [codegen] tests/codegen-llvm/sanitizer/memtag-attr-check.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/safestack-attr-check.rs ... ignored, ignored on targets without SafeStack support
test [codegen] tests/codegen-llvm/sanitizer/memory-track-origins.rs#MSAN-2-LTO ... ok
test [codegen] tests/codegen-llvm/sanitizer/memory-track-origins.rs#MSAN-2 ... ok
test [codegen] tests/codegen-llvm/sanitizer/riscv64-shadow-call-stack.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs#aarch64v8r ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs#riscv64gc ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs#aarch64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs#riscv64imac ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-hwasan-khwasan.rs#aarch64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-hwasan-khwasan.rs#aarch64v8r ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-asan-kasan.rs#x86_64 ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-inlining.rs#ASAN ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-kasan-asan.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-inlining.rs#LSAN ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off-khwasan-hwasan.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitizer-recover.rs#ASAN ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitize-off.rs ... ok
test [codegen] tests/codegen-llvm/sanitizer/sanitizer-recover.rs#ASAN-RECOVER ... ok
test [codegen] tests/codegen-llvm/sanitizer/scs-attr-check.rs ... ignored, ignored on targets without shadow call stacks
test [codegen] tests/codegen-llvm/sanitizer/sanitizer-recover.rs#MSAN ... ok
---
test [assembly] tests/assembly-llvm/s390x-vector-abi.rs#z10_vector ... ok
test [assembly] tests/assembly-llvm/s390x-vector-abi.rs#z13 ... ok
test [assembly] tests/assembly-llvm/sanitizer/kcfi/emit-arity-indicator.rs#x86_64 ... ignored, ignored when the LLVM version 20.1.8 is older than 21.0.0
test [assembly] tests/assembly-llvm/s390x-vector-abi.rs#z13_no_vector ... ok
test [assembly] tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs#hwasan ... ok
test [assembly] tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs#khwasan ... FAILED
test [assembly] tests/assembly-llvm/simd-bitmask.rs#aarch64 ... ok
test [assembly] tests/assembly-llvm/simd-bitmask.rs#x86 ... ok
test [assembly] tests/assembly-llvm/simd-bitmask.rs#x86-avx2 ... ok
test [assembly] tests/assembly-llvm/simd-bitmask.rs#x86-avx512 ... ok
test [assembly] tests/assembly-llvm/simd-intrinsic-gather.rs#x86-avx512 ... ok
---
test [assembly] tests/assembly-llvm/x86_64-windows-i128-abi.rs#softfloat ... ok

failures:

---- [assembly] tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs#khwasan stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs:23:17: error: khwasan-NOT: excluded string found in input
// khwasan-NOT: __hwasan_tls
                ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/sanitizer/hwasan-vs-khwasan.khwasan/hwasan-vs-khwasan.s:13:21: note: found here
 adrp x8, :gottprel:__hwasan_tls
                    ^~~~~~~~~~~~

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/sanitizer/hwasan-vs-khwasan.khwasan/hwasan-vs-khwasan.s
Check file: /checkout/tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
        1:  .file "hwasan_vs_khwasan.54a3b2f579d13220-cgu.0" 
        2:  .section .text.test,"ax",@progbits 
        3:  .globl test 
        4:  .p2align 2 
        5:  .type test,@function 
        6: test: 
        7:  .cfi_startproc 
        8:  stp x30, x20, [sp, #-16]! 
        9:  .cfi_def_cfa_offset 16 
       10:  .cfi_offset w20, -8 
       11:  .cfi_offset w30, -16 
       12:  .cfi_remember_state 
       13:  adrp x8, :gottprel:__hwasan_tls 
not:23                         !~~~~~~~~~~~  error: no match expected
       14:  ldr x8, [x8, :gottprel_lo12:__hwasan_tls] 
       15:  mrs x9, TPIDR_EL0 
       16:  ldr x8, [x9, x8] 
       17:  orr x9, x0, #0xff00000000000000 
       18:  lsr x9, x9, #4 
       19:  orr x8, x8, #0xffffffff 
       20:  add x20, x8, #1 
       21:  lsr x8, x0, #56 
       22:  ldrb w9, [x20, x9] 
       23:  cmp w8, w9 
       24:  b.eq .LBB0_2 
       25:  cmp w8, #255 
       26:  b.ne .LBB0_3 
       27: .LBB0_2: 
       28:  ldrb w0, [x0] 
       29:  ldp x30, x20, [sp], #16 
       30:  .cfi_def_cfa_offset 0 
       31:  .cfi_restore w20 
       32:  .cfi_restore w30 
       33:  ret 
       34: .LBB0_3: 
       35:  .cfi_restore_state 
       36:  bl __hwasan_check_x0_67043328_short_v2 
       37:  b .LBB0_2 
       38: .Lfunc_end0: 
       39:  .size test, .Lfunc_end0-test 
       40:  .cfi_endproc 
       41:  
       42:  .ident "rustc version 1.95.0-nightly (4cda1eea6 2026-02-27)" 
       43:  .section ".note.GNU-stack","",@progbits 
       44:  .section .text.hot,"axG",@progbits,__hwasan_check_x0_67043328_short_v2,comdat 
       45:  .type __hwasan_check_x0_67043328_short_v2,@function 
       46:  .weak __hwasan_check_x0_67043328_short_v2 
       47:  .hidden __hwasan_check_x0_67043328_short_v2 
       48: __hwasan_check_x0_67043328_short_v2: 
       49:  sbfx x16, x0, #4, #52 
       50:  ldrb w16, [x20, x16] 
       51:  cmp x16, x0, lsr #56 
       52:  b.ne .Ltmp0 
       53: .Ltmp1: 
       54:  ret 
       55: .Ltmp0: 
       56:  lsr x17, x0, #56 
       57:  cmp x17, #255 
       58:  b.eq .Ltmp1 
       59:  cmp w16, #15 
       60:  b.hi .Ltmp2 
       61:  and x17, x0, #0xf 
       62:  cmp w16, w17 
       63:  b.ls .Ltmp2 
       64:  orr x16, x0, #0xf 
       65:  ldrb w16, [x16] 
       66:  cmp x16, x0, lsr #56 
       67:  b.eq .Ltmp1 
       68: .Ltmp2: 
       69:  stp x0, x1, [sp, #-256]! 
       70:  stp x29, x30, [sp, #232] 
       71:  mov x1, #0 
       72:  b __hwasan_tag_mismatch_v2 
>>>>>>

------------------------------------------

error in revision `khwasan`: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-20/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/sanitizer/hwasan-vs-khwasan.khwasan/hwasan-vs-khwasan.s" "/checkout/tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs" "--check-prefix=CHECK" "--check-prefix" "khwasan" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs:23:17: error: khwasan-NOT: excluded string found in input
// khwasan-NOT: __hwasan_tls
                ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/sanitizer/hwasan-vs-khwasan.khwasan/hwasan-vs-khwasan.s:13:21: note: found here
 adrp x8, :gottprel:__hwasan_tls
                    ^~~~~~~~~~~~

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/assembly-llvm/sanitizer/hwasan-vs-khwasan.khwasan/hwasan-vs-khwasan.s
Check file: /checkout/tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
        1:  .file "hwasan_vs_khwasan.54a3b2f579d13220-cgu.0" 
        2:  .section .text.test,"ax",@progbits 
        3:  .globl test 
        4:  .p2align 2 
        5:  .type test,@function 
        6: test: 
        7:  .cfi_startproc 
        8:  stp x30, x20, [sp, #-16]! 
        9:  .cfi_def_cfa_offset 16 
       10:  .cfi_offset w20, -8 
       11:  .cfi_offset w30, -16 
       12:  .cfi_remember_state 
       13:  adrp x8, :gottprel:__hwasan_tls 
not:23                         !~~~~~~~~~~~  error: no match expected
       14:  ldr x8, [x8, :gottprel_lo12:__hwasan_tls] 
       15:  mrs x9, TPIDR_EL0 
       16:  ldr x8, [x9, x8] 
       17:  orr x9, x0, #0xff00000000000000 
       18:  lsr x9, x9, #4 
       19:  orr x8, x8, #0xffffffff 
       20:  add x20, x8, #1 
       21:  lsr x8, x0, #56 
       22:  ldrb w9, [x20, x9] 
       23:  cmp w8, w9 
       24:  b.eq .LBB0_2 
       25:  cmp w8, #255 
       26:  b.ne .LBB0_3 
       27: .LBB0_2: 
       28:  ldrb w0, [x0] 
       29:  ldp x30, x20, [sp], #16 
       30:  .cfi_def_cfa_offset 0 
       31:  .cfi_restore w20 
       32:  .cfi_restore w30 
       33:  ret 
       34: .LBB0_3: 
       35:  .cfi_restore_state 
       36:  bl __hwasan_check_x0_67043328_short_v2 
       37:  b .LBB0_2 
       38: .Lfunc_end0: 
       39:  .size test, .Lfunc_end0-test 
       40:  .cfi_endproc 
       41:  
       42:  .ident "rustc version 1.95.0-nightly (4cda1eea6 2026-02-27)" 
       43:  .section ".note.GNU-stack","",@progbits 
       44:  .section .text.hot,"axG",@progbits,__hwasan_check_x0_67043328_short_v2,comdat 
       45:  .type __hwasan_check_x0_67043328_short_v2,@function 
       46:  .weak __hwasan_check_x0_67043328_short_v2 
       47:  .hidden __hwasan_check_x0_67043328_short_v2 
       48: __hwasan_check_x0_67043328_short_v2: 
       49:  sbfx x16, x0, #4, #52 
       50:  ldrb w16, [x20, x16] 
       51:  cmp x16, x0, lsr #56 
       52:  b.ne .Ltmp0 
       53: .Ltmp1: 
       54:  ret 
       55: .Ltmp0: 
       56:  lsr x17, x0, #56 
       57:  cmp x17, #255 
       58:  b.eq .Ltmp1 
       59:  cmp w16, #15 
       60:  b.hi .Ltmp2 
       61:  and x17, x0, #0xf 
       62:  cmp w16, w17 
       63:  b.ls .Ltmp2 
       64:  orr x16, x0, #0xf 
       65:  ldrb w16, [x16] 
       66:  cmp x16, x0, lsr #56 
       67:  b.eq .Ltmp1 
       68: .Ltmp2: 
       69:  stp x0, x1, [sp, #-256]! 
       70:  stp x29, x30, [sp, #232] 
       71:  mov x1, #0 
       72:  b __hwasan_tag_mismatch_v2 
>>>>>>
------------------------------------------

---- [assembly] tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs#khwasan stdout end ----

failures:
    [assembly] tests/assembly-llvm/sanitizer/hwasan-vs-khwasan.rs#khwasan

test result: FAILED. 530 passed; 1 failed; 92 ignored; 0 measured; 0 filtered out; finished in 14.36s

Some tests failed in compiletest suite=assembly-llvm mode=assembly host=aarch64-unknown-linux-gnu target=aarch64-unknown-linux-gnu
Bootstrap failed while executing `--stage 2 test --skip tidy --skip compiler --skip src`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-sanitizers Area: Sanitizers for correctness and code quality A-testsuite Area: The testsuite used to check the correctness of rustc PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants